package com.meshnetics.gb.stack.core.apl.type;

import com.meshnetics.gb.type.impl.zcl.FixedBytesDataValue;

/**
 * Type for DeviceId.
 *
 * @author mmarkov
 */
public class TypeDeviceId extends TypeClusterId {
    /** The only instance of this type. */
    public static final TypeDeviceId TYPE = new TypeDeviceId();

    /**
     * Contructs TypeDeviceId with the pre-defined name ('deviceId').
     */
    private TypeDeviceId() {
        super(new String[] { "deviceId" });
    }

    /**
     * Creates DeviceId from array of bytes.
     *
     * @param bytes array of bytes
     * @return constructed DeviceId
     */
    protected FixedBytesDataValue createValue(byte[] bytes) {
        return new DeviceId(this, bytes);
    }
}
